package edu.cqbvc.dao;

import java.util.Objects;

public class UserInfo {
	private String userId;
	private String userName;
	private String userPassword;
	private byte userOnline;
	public UserInfo() {
		
	}
	
	
	
	public UserInfo(String userId, String userName, String userPassword, byte userOnline) {
		super();
		this.userId = userId;
		this.userName = userName;
		this.userPassword = userPassword;
		this.userOnline = userOnline;
	}



	public String getUserId() {
		return userId;
	}



	public void setUserId(String userId) {
		this.userId = userId;
	}



	public String getUserName() {
		return userName;
	}



	public void setUserName(String userName) {
		this.userName = userName;
	}



	public String getUserPassword() {
		return userPassword;
	}



	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}



	public byte getUserOnline() {
		return userOnline;
	}



	public void setUserOnline(byte userOnline) {
		this.userOnline = userOnline;
	}

	

	@Override
	public int hashCode() {
		return Objects.hash(userId, userName, userOnline, userPassword);
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (!(obj instanceof UserInfo)) {
			return false;
		}
		UserInfo other = (UserInfo) obj;
		return Objects.equals(userId, other.userId) && Objects.equals(userName, other.userName)
				&& userOnline == other.userOnline && Objects.equals(userPassword, other.userPassword);
	}



	@Override
	public String toString() {
		return getUserName();
	}
	
}
